/*
 * Player
-color : int
+choosePawnToMove(index : int) : boolean
+movePawnToStart(pawn : int) : boolean
+move(pawn : int, positionToMove : int) : boolean
+getPawnAtPosition(boardIndex : int) : Pawn
+moveExists(cardValue : int) : boolean 
 */
public class Player 
{
    private int _color;
    private Pawn[] _pawns;
    
    /**
     * This is the Constructor method
     */
    public Player(int color)
    {
        // red = 0
        // blue = 1
        // yellow = 2
        // green = 3
        _color = color;
        
        _pawns = new Pawn[4];
        for (int i = 0; i < 4; i++)
        {
          _pawns[i] = new Pawn();
        }
    }
    
  /**
  *  Moves the given pawn to start
  */
  public boolean movePawnToStart(int pawnIndex) 
  {
    _pawn[pawnIndex].changeStart(true);
  }
  
  public boolean move(int pawnIndex, int positionToMove)
  {
    System.out.println("move not developed yet");
  }
  
  /*
  * Finds and returns which pawn is at the boardIndex given.
  * If no pawn exists in the given boardIndex then return -1.
  */
  public int getPawnAtPosition(int boardIndex)
  {
    int pawnIndex = -1;
    for(i = 0; i < (_pawn.length - 1); i++)
    {
      if(_pawn[i].getPositionIndex() == boardIndex)
      {
        pawnIndex = _pawn[i].getPositionIndex();
      }
    }
    
    return pawnIndex;
  }
  
  public boolean moveExists(int cardValue)
  {
    System.out.println("moveExists not developed yet");
  } 
    
}